import request from "@/utils/request";

export const queryPageApi = (name, gender, begin, end, page, pageSize) => {
  return request.get("/emps", {
    params: {
      name,
      gender,
      begin,
      end,
      page,
      pageSize,
    },
  });
};

export const addEmpApi = (emp) => request.post("/emps", emp);
export const getAllEmpsApi = () => request.get("/emps/list");

export const delEmpApi = (ids) => {
  return request.delete(`/emps?ids=${ids}`);
};
export const queryInfoApi = (id) => request.get(`/emps/${id}`);
export const updateEmpApi = (emp) => request.put("/emps", emp);
